package org.hxyjs.entity;

import java.util.ArrayList;
import java.util.List;

public class NewsExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public NewsExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andNenoIsNull() {
            addCriterion("neno is null");
            return (Criteria) this;
        }

        public Criteria andNenoIsNotNull() {
            addCriterion("neno is not null");
            return (Criteria) this;
        }

        public Criteria andNenoEqualTo(String value) {
            addCriterion("neno =", value, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoNotEqualTo(String value) {
            addCriterion("neno <>", value, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoGreaterThan(String value) {
            addCriterion("neno >", value, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoGreaterThanOrEqualTo(String value) {
            addCriterion("neno >=", value, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoLessThan(String value) {
            addCriterion("neno <", value, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoLessThanOrEqualTo(String value) {
            addCriterion("neno <=", value, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoLike(String value) {
            addCriterion("neno like", value, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoNotLike(String value) {
            addCriterion("neno not like", value, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoIn(List<String> values) {
            addCriterion("neno in", values, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoNotIn(List<String> values) {
            addCriterion("neno not in", values, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoBetween(String value1, String value2) {
            addCriterion("neno between", value1, value2, "neno");
            return (Criteria) this;
        }

        public Criteria andNenoNotBetween(String value1, String value2) {
            addCriterion("neno not between", value1, value2, "neno");
            return (Criteria) this;
        }

        public Criteria andNenameIsNull() {
            addCriterion("nename is null");
            return (Criteria) this;
        }

        public Criteria andNenameIsNotNull() {
            addCriterion("nename is not null");
            return (Criteria) this;
        }

        public Criteria andNenameEqualTo(String value) {
            addCriterion("nename =", value, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameNotEqualTo(String value) {
            addCriterion("nename <>", value, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameGreaterThan(String value) {
            addCriterion("nename >", value, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameGreaterThanOrEqualTo(String value) {
            addCriterion("nename >=", value, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameLessThan(String value) {
            addCriterion("nename <", value, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameLessThanOrEqualTo(String value) {
            addCriterion("nename <=", value, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameLike(String value) {
            addCriterion("nename like", value, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameNotLike(String value) {
            addCriterion("nename not like", value, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameIn(List<String> values) {
            addCriterion("nename in", values, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameNotIn(List<String> values) {
            addCriterion("nename not in", values, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameBetween(String value1, String value2) {
            addCriterion("nename between", value1, value2, "nename");
            return (Criteria) this;
        }

        public Criteria andNenameNotBetween(String value1, String value2) {
            addCriterion("nename not between", value1, value2, "nename");
            return (Criteria) this;
        }

        public Criteria andNestateIsNull() {
            addCriterion("nestate is null");
            return (Criteria) this;
        }

        public Criteria andNestateIsNotNull() {
            addCriterion("nestate is not null");
            return (Criteria) this;
        }

        public Criteria andNestateEqualTo(String value) {
            addCriterion("nestate =", value, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateNotEqualTo(String value) {
            addCriterion("nestate <>", value, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateGreaterThan(String value) {
            addCriterion("nestate >", value, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateGreaterThanOrEqualTo(String value) {
            addCriterion("nestate >=", value, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateLessThan(String value) {
            addCriterion("nestate <", value, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateLessThanOrEqualTo(String value) {
            addCriterion("nestate <=", value, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateLike(String value) {
            addCriterion("nestate like", value, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateNotLike(String value) {
            addCriterion("nestate not like", value, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateIn(List<String> values) {
            addCriterion("nestate in", values, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateNotIn(List<String> values) {
            addCriterion("nestate not in", values, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateBetween(String value1, String value2) {
            addCriterion("nestate between", value1, value2, "nestate");
            return (Criteria) this;
        }

        public Criteria andNestateNotBetween(String value1, String value2) {
            addCriterion("nestate not between", value1, value2, "nestate");
            return (Criteria) this;
        }

        public Criteria andNeimgIsNull() {
            addCriterion("neimg is null");
            return (Criteria) this;
        }

        public Criteria andNeimgIsNotNull() {
            addCriterion("neimg is not null");
            return (Criteria) this;
        }

        public Criteria andNeimgEqualTo(String value) {
            addCriterion("neimg =", value, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgNotEqualTo(String value) {
            addCriterion("neimg <>", value, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgGreaterThan(String value) {
            addCriterion("neimg >", value, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgGreaterThanOrEqualTo(String value) {
            addCriterion("neimg >=", value, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgLessThan(String value) {
            addCriterion("neimg <", value, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgLessThanOrEqualTo(String value) {
            addCriterion("neimg <=", value, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgLike(String value) {
            addCriterion("neimg like", value, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgNotLike(String value) {
            addCriterion("neimg not like", value, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgIn(List<String> values) {
            addCriterion("neimg in", values, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgNotIn(List<String> values) {
            addCriterion("neimg not in", values, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgBetween(String value1, String value2) {
            addCriterion("neimg between", value1, value2, "neimg");
            return (Criteria) this;
        }

        public Criteria andNeimgNotBetween(String value1, String value2) {
            addCriterion("neimg not between", value1, value2, "neimg");
            return (Criteria) this;
        }

        public Criteria andNedescIsNull() {
            addCriterion("nedesc is null");
            return (Criteria) this;
        }

        public Criteria andNedescIsNotNull() {
            addCriterion("nedesc is not null");
            return (Criteria) this;
        }

        public Criteria andNedescEqualTo(String value) {
            addCriterion("nedesc =", value, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescNotEqualTo(String value) {
            addCriterion("nedesc <>", value, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescGreaterThan(String value) {
            addCriterion("nedesc >", value, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescGreaterThanOrEqualTo(String value) {
            addCriterion("nedesc >=", value, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescLessThan(String value) {
            addCriterion("nedesc <", value, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescLessThanOrEqualTo(String value) {
            addCriterion("nedesc <=", value, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescLike(String value) {
            addCriterion("nedesc like", value, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescNotLike(String value) {
            addCriterion("nedesc not like", value, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescIn(List<String> values) {
            addCriterion("nedesc in", values, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescNotIn(List<String> values) {
            addCriterion("nedesc not in", values, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescBetween(String value1, String value2) {
            addCriterion("nedesc between", value1, value2, "nedesc");
            return (Criteria) this;
        }

        public Criteria andNedescNotBetween(String value1, String value2) {
            addCriterion("nedesc not between", value1, value2, "nedesc");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}